package com.yan.exceptiontest.test;

import com.yan.exceptiontest.exception.MarkRuntimeException;

import java.util.Scanner;

public class ExceptionTest1 {
    public static void main(String[] args) {
        int mark;
        System.out.println("输入成绩");
        Scanner input = new Scanner(System.in);
        mark = input.nextInt();
        if(mark < 0 || mark >100){
            throw new MarkRuntimeException("分数必须在0-100之间");
        }
    }
}
